#ifndef __ATMOS_Common_h__

#include <assert.h>
#include <sstream>
#include <vector>
#include <list>
#include <stdexcept>

#include "ATMOS_LogManager.h"

#define ATMOS_PLATFORM_WIN32 0
#define ATMOS_PLATFORM_LINUX 1
#define ATMOS_PLATFORM_OSX 2

#if( ATMOS_PLATFORM == ATMOS_PLATFORM_WIN32 )
    #if defined( ATMOS_NONCLIENT_BUILD )
        #define AtmosExport __declspec( dllexport )
    #else
        #define AtmosExport __declspec( dllimport )
    #endif
#else
#define AtmosExport
#endif

#if( ATMOS_PLATFORM == ATMOS_PLATFORM_WIN32 )
#pragma warning (disable : 4251)
#endif

#define ATMOS_THROW_RT( x ) { std::stringstream _ss; _ss << x; throw std::runtime_error( _ss.str().c_str() ); }
#define ATMOS_THROW_LOGIC( x )  { std::stringstream _ss; _ss << x; throw std::logic_error( _ss.str().c_str() ); }

#define ATMOS_ASSERT( x ) { assert( x && __FUNCTION__ ); }

namespace ATMOS {

struct AtmosExport NetworkConnectionInfo;

class AtmosExport NetworkManager;
class AtmosExport NetworkManagerClient;
class AtmosExport NetworkManagerServer;
class AtmosExport Packet;
class AtmosExport PacketListener;
class AtmosExport LogManager;

class AtmosExport MasterServer;
class AtmosExport MasterServerDatabase;
class AtmosExport MSClient;
struct AtmosExport MSClientInfo;

struct AtmosExport GameServerInfo;
struct AtmosExport GameClientInfo;
struct AtmosExport DatabaseConnectionInfo;

typedef unsigned char RakNetPacketID;

typedef unsigned int uint;
typedef unsigned short ushort;
typedef unsigned char uchar;

typedef std::vector<std::string> StringVector;
typedef std::list<std::string> StringList;

typedef std::list<GameClientInfo> GameClientInfoList;
typedef std::list<GameServerInfo> GameServerInfoList;
typedef std::list<const MSClientInfo*> MSClientInfoList;

} // end namespace ATMOS

#endif
